<html>
<head><meta charset="utf-8"><title>How to learn more about crate metadata? · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html">How to learn more about crate metadata?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216168147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168147">(Nov 10 2020 at 02:54)</a>:</h4>
<p>Can anyone point me to a place I read more about crate metadata (its fine if its just a place in the rustc codebase to start)? context is I am starting to look at this: <a href="https://github.com/rust-lang/rust/issues/78708">https://github.com/rust-lang/rust/issues/78708</a></p>



<a name="216168226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168226">(Nov 10 2020 at 02:56)</a>:</h4>
<p>hmm, <a href="https://rustc-dev-guide.rust-lang.org/serialization.html">https://rustc-dev-guide.rust-lang.org/serialization.html</a> might be a good place to start</p>



<a name="216168228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168228">(Nov 10 2020 at 02:56)</a>:</h4>
<p>and the relevant code is <code>rustc_metadata</code></p>



<a name="216168256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168256">(Nov 10 2020 at 02:57)</a>:</h4>
<p>if you want a more hands-on example, <a href="https://github.com/rust-lang/rust/pull/75176">https://github.com/rust-lang/rust/pull/75176</a> shows what happens when metadata loading goes wrong <span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span></p>



<a name="216168261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168261">(Nov 10 2020 at 02:57)</a>:</h4>
<p>spent <em>so</em> much time debugging that</p>



<a name="216168463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168463">(Nov 10 2020 at 03:02)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F/near/216168261">said</a>:</p>
<blockquote>
<p>spent <em>so</em> much time debugging that</p>
</blockquote>
<p>oh i vaguely remember reading this and being very confused by it lol</p>
<p>thanks for the pointers! and just 1 quick question, I know the in default case libraries become rlib, but what IS an rlib? I heard that we actually put the metadata, at least for generics in the actual llvm ir as "bitcode" or something like that, is that correct? (also I was about to ask how the hell cpp does this but then I remembered, header files lmaooo)</p>



<a name="216168473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168473">(Nov 10 2020 at 03:02)</a>:</h4>
<p>rlib mostly contains MIR I think? and maybe some other things related to DefIds</p>



<a name="216168478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168478">(Nov 10 2020 at 03:02)</a>:</h4>
<p>rustc_metadata will tell you exactly</p>



<a name="216168500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168500">(Nov 10 2020 at 03:03)</a>:</h4>
<p>it does not usually contain LLVM IR since recently, let me find the PR</p>



<a name="216168550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168550">(Nov 10 2020 at 03:04)</a>:</h4>
<p>interesting...ill play around with rustc_metadata</p>



<a name="216168561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168561">(Nov 10 2020 at 03:04)</a>:</h4>
<p>I think <a href="https://github.com/rust-lang/rust/pull/71323">https://github.com/rust-lang/rust/pull/71323</a></p>



<a name="216168564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168564">(Nov 10 2020 at 03:04)</a>:</h4>
<p>Also <span class="user-mention" data-user-id="232545">@Joshua Nelson</span> u answer like every question in the rustc zulip, its very impressive!</p>



<a name="216168579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168579">(Nov 10 2020 at 03:05)</a>:</h4>
<p>I remember when I first got started I couldn't get <em>anyone</em> to answer my questions <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="216168583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168583">(Nov 10 2020 at 03:05)</a>:</h4>
<p>so I try to help people get unstuck</p>



<a name="216168640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168640">(Nov 10 2020 at 03:06)</a>:</h4>
<p>thats very generous! and appreciated! I have gotten a lot more comfortable in rust-lang/rust cause of your help!</p>



<a name="216168643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168643">(Nov 10 2020 at 03:06)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F/near/216168561">said</a>:</p>
<blockquote>
<p>I think <a href="https://github.com/rust-lang/rust/pull/71323">https://github.com/rust-lang/rust/pull/71323</a></p>
</blockquote>
<p>very interesting, thanks for the pointers!!</p>



<a name="216168649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168649">(Nov 10 2020 at 03:07)</a>:</h4>
<p>glad to know it helps <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="216168911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168911">(Nov 10 2020 at 03:14)</a>:</h4>
<p>Rlibs: <a href="https://github.com/rust-lang/rust/issues/38913">https://github.com/rust-lang/rust/issues/38913</a></p>



<a name="216168932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168932">(Nov 10 2020 at 03:15)</a>:</h4>
<p>I think that issue is out of date</p>



<a name="216168979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168979">(Nov 10 2020 at 03:16)</a>:</h4>
<p><span class="user-mention silent" data-user-id="257428">Gus Wynn</span> <a href="#narrow/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F/near/216168463">said</a>:</p>
<blockquote>
<p>but what IS an rlib? </p>
</blockquote>
<p><span class="user-mention" data-user-id="257428">@Gus Wynn</span>  An rlib is a standard <code>.a</code> archive (similar to a tar file).  What it contains depends a lot on the compiler options, but it it is some combination of object code, LLVM bitcode, and rustc-specific metadata.</p>



<a name="216168992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216168992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216168992">(Nov 10 2020 at 03:17)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F/near/216168932">said</a>:</p>
<blockquote>
<p>I think that issue is out of date</p>
</blockquote>
<p>left a comment</p>



<a name="216169010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ivan Serdyuk <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169010">(Nov 10 2020 at 03:17)</a>:</h4>
<p>any experts in rust-lld here?</p>



<a name="216169056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169056">(Nov 10 2020 at 03:18)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120518">Eric Huss</span> <a href="#narrow/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F/near/216168979">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="257428">Gus Wynn</span> <a href="#narrow/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F/near/216168463">said</a>:</p>
<blockquote>
<p>but what IS an rlib? </p>
</blockquote>
<p><span class="user-mention silent" data-user-id="257428">Gus Wynn</span>  An rlib is a standard <code>.a</code> archive (similar to a tar file).  What it contains depends a lot on the compiler options, but it it is some combination of object code, LLVM bitcode, and rustc-specific metadata.</p>
</blockquote>
<p>yeah from that issue it's LLVM IR and machine code</p>



<a name="216169121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169121">(Nov 10 2020 at 03:20)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F/near/216168992">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F/near/216168932">said</a>:</p>
<blockquote>
<p>I think that issue is out of date</p>
</blockquote>
<p>left a comment</p>
</blockquote>
<p>I thumbed it up</p>



<a name="216169138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169138">(Nov 10 2020 at 03:21)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F/near/216168992">said</a>:</p>
<blockquote>
<p>left a comment</p>
</blockquote>
<p>MIR-only rlibs are a different approach, and is somewhat unrelated to the bitcode options that were added.  I think there is still some interest in having them, though as the issue mentions there are some tradeoffs.</p>



<a name="216169190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169190">(Nov 10 2020 at 03:22)</a>:</h4>
<p>wait, so what's in an .rlib with --embed-bitcode=no, if it's not MIR?</p>



<a name="216169201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169201">(Nov 10 2020 at 03:23)</a>:</h4>
<p>It's compiled object code + metadata.</p>



<a name="216169211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169211">(Nov 10 2020 at 03:23)</a>:</h4>
<p>oh I see</p>



<a name="216169214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169214">(Nov 10 2020 at 03:23)</a>:</h4>
<p>the suggestion is not to go through llvm at all until the final linking stage?</p>



<a name="216169258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169258">(Nov 10 2020 at 03:24)</a>:</h4>
<p>I think it's to store all MIR not just generics, inline, and consts</p>



<a name="216169262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169262">(Nov 10 2020 at 03:24)</a>:</h4>
<p>Yea, I believe so.</p>



<a name="216169263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169263">(Nov 10 2020 at 03:24)</a>:</h4>
<p>optimize the MIR before storing it</p>



<a name="216169266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169266">(Nov 10 2020 at 03:25)</a>:</h4>
<p>that sounds useful :)</p>



<a name="216169279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169279">(Nov 10 2020 at 03:25)</a>:</h4>
<p>and add an unstable compiler flag which tries to build from MIR instead<br>
of precompiled artifacts</p>



<a name="216169286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169286">(Nov 10 2020 at 03:25)</a>:</h4>
<p>and some clean up</p>



<a name="216169334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169334">(Nov 10 2020 at 03:26)</a>:</h4>
<p>I had just read this before I'm not in on the process</p>



<a name="216169414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169414">(Nov 10 2020 at 03:29)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/38913#issuecomment-322158939">https://github.com/rust-lang/rust/issues/38913#issuecomment-322158939</a></p>



<a name="216169497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216169497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216169497">(Nov 10 2020 at 03:31)</a>:</h4>
<p>oh wow, this might allow unifying <code>check</code> and <code>build</code> metadata <a href="https://github.com/rust-lang/rust/issues/38913#issuecomment-322323908">https://github.com/rust-lang/rust/issues/38913#issuecomment-322323908</a></p>



<a name="216252738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/216252738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#216252738">(Nov 10 2020 at 18:26)</a>:</h4>
<p>thanks for the thorough answer!</p>



<a name="217421513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/How%20to%20learn%20more%20about%20crate%20metadata%3F/near/217421513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/How.20to.20learn.20more.20about.20crate.20metadata.3F.html#217421513">(Nov 20 2020 at 16:11)</a>:</h4>
<p>Do we have a simple way to lookup more info about an extern type? should I just look at methods on CStore that is contained in the Resolver?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>